package org.liubility.robot;

import com.jdragon.common.utils.FileUtils;
import kotlin.Unit;
import net.mamoe.mirai.Bot;
import net.mamoe.mirai.BotFactoryJvm;
import net.mamoe.mirai.contact.Group;
import net.mamoe.mirai.event.*;
import net.mamoe.mirai.message.FriendMessageEvent;
import net.mamoe.mirai.message.GroupMessageEvent;
import net.mamoe.mirai.message.data.*;
import net.mamoe.mirai.utils.BotConfiguration;

import java.io.File;

/**
 * @Author: Jdragon
 * @email: 1061917196@qq.com
 * @Date: 2020.09.02 16:50
 * @Description:
 */
public class Mirai {

    public static void main(String[] args) {
        // 使用自定义的配置
        BotConfiguration botConfiguration = new BotConfiguration();
        botConfiguration.fileBasedDeviceInfo("deviceInfo.json");
        botConfiguration.setProtocol(BotConfiguration.MiraiProtocol.ANDROID_PAD);
        botConfiguration.noNetworkLog();
        Bot bot = BotFactoryJvm.newBot(298880551, "aa456+++", botConfiguration);
        Events.registerEvents(bot, new PostOrderManage());
        bot.login();
        bot.join();

    }
}
